× Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Lesson 9 Lesson 10 Lesson 11 Lesson 12 Lesson 13 Lesson 14 Lesson 15 Lesson 16

All lessons

Lesson 4 - Strings, Ints, Booleans, Floats

Python has different types of data types, things that can be used to output, to set as values for variables, store information, and many more uses that you will learn throughout this course.

The first data type are integers, which you have already used last lesson when you tried out setting values for variables. Integers are whole real numbers, such as 4, -4, 0, etc.

The next data type are strings, which is also something you have already dealt with in the first and second lesson, simply text enclosed in quotation marks, such as "Hello, World!" and "I am currently learning Python!"

The third data type are booleans, which are very simple, True and False, which will become very useful later on in the course.

The fourth and final data type I will be going over is floats, which are the same as integers, except that they are nonwhole real numbers, such as 4.3, -4.3, 6/4, etc.

Now it is up to you to experiment with all four of these data types, such as by printing out a float, setting the variable name equal to your name, or anything that you want. Once you are done experimenting, you can move on to the next lesson